/**
 * Created by Zhang JiRen
 * @date 2022/7/22 0022
 */
import request from "@/utils/request";

const create = params => {
  return request({
    url: "/api/v1/rule/create",
    method: "post",
    data: params
  });
};

const _delete = params => {
  return request({
    url: "/api/v1/rule/delete",
    method: "get",
    data: params
  });
};
const getTechnique = params => {
  return request({
    url: "/api/v1/rule/technique",
    method: "get",
    data: params
  });
};
const getKeyword = params => {
  return request({
    url: "/api/v1/rule/keywords",
    method: "post",
    data: params
  });
};
const getKeywordProp = params => {
  return request({
    url: "/api/v1/rule/keywords/property",
    method: "post",
    data: params
  });
};
const getorg = params => {
  return request({
    url: "/api/v1/rule/getorg",
    method: "get",
    data: params
  });
};

const getpublic = params => {
  return request({
    url: "/api/v1/rule/getpublic",
    method: "get",
    data: params
  });
};

const detail = params => {
  return request({
    url: "/api/v1/rule/detail",
    method: "get",
    data: params
  });
};

const disable = params => {
  return request({
    url: "/api/v1/rule/disable",
    method: "get",
    data: params
  });
};

const undisable = params => {
  return request({
    url: "/api/v1/rule/undisable",
    method: "get",
    data: params
  });
};

const scenario = params => {
  return request({
    url: "/api/v1/rule/scenario",
    method: "get",
    data: params
  });
};

const severity = params => {
  return request({
    url: "/api/v1/rule/severity",
    method: "get",
    data: params
  });
};

export default {
  create,
  _delete,
  getorg,
  getpublic,
  detail,
  disable,
  undisable,
  scenario,
  severity,
  getTechnique,
  getKeyword,
  getKeywordProp
};
